import { get, post, postPage, downLoad } from './tools';

// 获取资产树
export const getAssetTree = () => get({
  url: `/solar-health-degree-backend/v1.0/assetPullDown`,
});
// 获取指标
export const getHealthRankingList = (data) => get({
  url: `/solar-health-degree-backend/v1.0/queryHealthRankingList?isStation=${data}`,
});
// 获取维度
export const getMetricToStationDimension = (data) => get({
  url: `/solar-health-degree-backend/v1.0/queryHistoryMetricToStationDimension?num=${data}`,
});
// 获取光伏场站对标
export const getFreePhotovoltaic = (data) => post({
  url: `/solar-health-degree-backend/v1.0/troubleFreePhotovoltaic`,
  data: data
});
// 场站可利用率曲线
export const getHistoryMetricToStation = (data) => post({
  url: `/solar-health-degree-backend/v1.0/queryHistoryMetricToStation`,
  data: data
});
// 健康度排行榜
export const getHealthRankings = (data) => post({
  url: `/solar-health-degree-backend/v1.0/healthRankings`,
  data: data
});

// 区域-场站健康度明细或下钻详情
export const getQueryHealthBreakDown = (data) => postPage({
  url: `/solar-health-degree-backend/v1.0/queryHealthBreakDown`,
  data: data
});

// 区域-场站健康度明细或下钻详情导出
export const getExportHealthBreakDown = (data) => downLoad({
  url: `/solar-health-degree-backend/v1.0/exportHealthBreakDownExcel`,
  data: data
});

// 健康度告警查询
export const getQueryHealthAlerts = (data) => postPage({
  url: `/solar-health-degree-backend/v1.0/queryHealthAlerts`,
  data: data
});

// 健康度告警导出
export const getExportHealthAlerts = (data) => downLoad({
  url: `/solar-health-degree-backend/v1.0/queryHealthAlertsExport`,
  data: data
});